<?php
include('../api.php');
include('nickname.php');
set_time_limit(0);
$sites = array
(
  array
    (
        "fa"=> 'a@abc.com',//发件地址
        "shou"=>'["10000@qq.com"]'//收件地址
),
    array
    (
        "fa"=> 'b@abc.com',
        "shou"=>'["20000@qq.com"]'
    )
);
echo '<pre>';
foreach ($site as $value) {
	$mail_from=$value['fa'];	//循环获取发件地址

	$mail_to=$value['shou'];	//循环获取收件地址

	$subject=generate_name().nickname().'邮件标题';	//这里是自定义邮件标题
    $conten='<img src="https://img2.baidu.com/it/u=2695670799,1031144296&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500"  alt="上海鲜花港 - 郁金香" />'. date('Y-m-d h:i:s', time()).generate_name().'邮件正文'.ch_name().nickname();//这里是自定义邮件正文 一定是html格式
	
	$api= new bt_api();
	$r_data = $api->Emaifa($mail_from,$mail_to,$subject,$conten);
	header('Content-type: application/json');
	var_dump($value);
	var_dump($r_data);
}
?>